#include<stdio.h>
#define N 30
int main(void)
{
	int fib[N] = { 0,1,1 };
	int i, n;
	do
	{
		printf("Please a number\n");
		scanf_s("%d", &n);
	} while (n <= 0 || n >N-1);
	for (i = 3; i <= n; i++)
	{
		fib[i] = fib[i - 1] + fib[i - 2];
     }
	i = 1;
	do
	{
		printf("%10d", fib[i]);
		if (i % 5 == 0)printf("\n");
		i++;
	} while (fib[i] <= 1000);
	printf("\nThe number is %d", i);





}